{
 "cells": [
  {
   "cell_type": "code",
   "id": "initial_id",
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "end_time": "2025-02-12T07:16:38.428723Z",
     "start_time": "2025-02-12T07:16:38.420564Z"
    }
   },
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "index1 = pd.MultiIndex.from_arrays([['a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'c', 'd', 'd', 'd'],\n",
    "                [0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2]], names=['cloth', 'size'])\n",
    "\n",
    "ser_obj = pd.Series(np.random.randn(12),index=index1)\n",
    "df_obj=ser_obj.unstack(0)\n",
    "# print(ser_obj)\n",
    "# print('*'*30)\n",
    "# print(df_obj)\n",
    "#计算最小值有空值如何处理\n",
    "df_obj.loc[0,'b']=np.nan\n",
    "print(df_obj)\n",
    "print('-'*50)\n",
    "print(df_obj.min(axis=0))"
   ],
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "cloth         a         b         c         d\n",
      "size                                         \n",
      "0     -0.174764       NaN  0.832836 -0.790098\n",
      "1     -0.048863  1.751679 -0.532046 -0.362283\n",
      "2     -0.545399  1.074820  1.851597  0.061346\n",
      "--------------------------------------------------\n",
      "cloth\n",
      "a   -0.545399\n",
      "b    1.074820\n",
      "c   -0.532046\n",
      "d   -0.790098\n",
      "dtype: float64\n"
     ]
    }
   ],
   "execution_count": 7
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T07:08:02.810116Z",
     "start_time": "2025-02-12T07:08:02.799570Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#观察数据分布的一种 非常常用方法\n",
    "print(df_obj.describe())"
   ],
   "id": "30dccc37d4b1ac7",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "cloth         a         b         c         d\n",
      "count  3.000000  2.000000  3.000000  3.000000\n",
      "mean   0.125524  0.972565  0.697231 -0.661433\n",
      "std    1.485123  0.705721  1.639322  1.117425\n",
      "min   -1.582188  0.473545 -0.879611 -1.656956\n",
      "25%   -0.369190  0.723055 -0.150452 -1.265750\n",
      "50%    0.843808  0.972565  0.578707 -0.874543\n",
      "75%    0.979380  1.222075  1.485653 -0.163671\n",
      "max    1.114953  1.471585  2.392598  0.547201\n"
     ]
    }
   ],
   "execution_count": 2
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T07:17:25.214320Z",
     "start_time": "2025-02-12T07:17:25.206623Z"
    }
   },
   "cell_type": "code",
   "source": "df_obj.loc[:,'c']",
   "id": "1bfc51e6f4489b5a",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "size\n",
       "0    0.832836\n",
       "1   -0.532046\n",
       "2    1.851597\n",
       "Name: c, dtype: float64"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 8
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T07:56:53.644154Z",
     "start_time": "2025-02-12T07:56:53.637136Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#计算最小值或者最大值的索引的位置\n",
    "print(df_obj.loc[:,'c'].argmin())#argmin和argmax只能是series，不能是df\n",
    "df_obj"
   ],
   "id": "b79a2e1e845bba3",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "cloth         a         b         c         d\n",
       "size                                         \n",
       "0     -0.174764       NaN  0.832836 -0.790098\n",
       "1     -0.048863  1.751679 -0.532046 -0.362283\n",
       "2     -0.545399  1.074820  1.851597  0.061346"
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>cloth</th>\n",
       "      <th>a</th>\n",
       "      <th>b</th>\n",
       "      <th>c</th>\n",
       "      <th>d</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>size</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-0.174764</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.832836</td>\n",
       "      <td>-0.790098</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>-0.048863</td>\n",
       "      <td>1.751679</td>\n",
       "      <td>-0.532046</td>\n",
       "      <td>-0.362283</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>-0.545399</td>\n",
       "      <td>1.074820</td>\n",
       "      <td>1.851597</td>\n",
       "      <td>0.061346</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 11
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T07:58:00.822009Z",
     "start_time": "2025-02-12T07:58:00.815863Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#返回的是一个series\n",
    "#计算最小值或者最大值的索引值\n",
    "df_obj.idxmin(axis=0, skipna=False)"
   ],
   "id": "542849945121c40f",
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\75713\\AppData\\Local\\Temp\\ipykernel_48616\\3115838294.py:3: FutureWarning: The behavior of DataFrame.idxmin with all-NA values, or any-NA and skipna=False, is deprecated. In a future version this will raise ValueError\n",
      "  df_obj.idxmin(axis=0, skipna=False)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "cloth\n",
       "a    2.0\n",
       "b    NaN\n",
       "c    1.0\n",
       "d    0.0\n",
       "dtype: float64"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 12
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T07:58:31.917992Z",
     "start_time": "2025-02-12T07:58:31.912439Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#返回的是一个series\n",
    "#计算最小值或者最大值的索引值\n",
    "df_obj.idxmin(axis=0, skipna=True)   #按照列返回最大值最小值的索引"
   ],
   "id": "f07ca161fa1dfd80",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "cloth\n",
       "a    2\n",
       "b    2\n",
       "c    1\n",
       "d    0\n",
       "dtype: int64"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 14
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T08:00:32.784270Z",
     "start_time": "2025-02-12T08:00:32.758097Z"
    }
   },
   "cell_type": "code",
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "from matplotlib import pyplot as plt\n",
    "\n",
    "file_path = \"IMDB-Movie-Data.csv\"\n",
    "df = pd.read_csv(file_path) #不加路径默认当前路径\n",
    "# 打印数据信息\n",
    "print(df.info()) #查看数据的信息\n",
    "print('-'*50)\n",
    "df.head() #查看数值类型的数据的信息\n"
   ],
   "id": "98fdb08ec05baa60",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 1000 entries, 0 to 999\n",
      "Data columns (total 12 columns):\n",
      " #   Column              Non-Null Count  Dtype  \n",
      "---  ------              --------------  -----  \n",
      " 0   Rank                1000 non-null   int64  \n",
      " 1   Title               1000 non-null   object \n",
      " 2   Genre               1000 non-null   object \n",
      " 3   Description         1000 non-null   object \n",
      " 4   Director            1000 non-null   object \n",
      " 5   Actors              1000 non-null   object \n",
      " 6   Year                1000 non-null   int64  \n",
      " 7   Runtime (Minutes)   1000 non-null   int64  \n",
      " 8   Rating              1000 non-null   float64\n",
      " 9   Votes               1000 non-null   int64  \n",
      " 10  Revenue (Millions)  872 non-null    float64\n",
      " 11  Metascore           936 non-null    float64\n",
      "dtypes: float64(3), int64(4), object(5)\n",
      "memory usage: 93.9+ KB\n",
      "None\n",
      "--------------------------------------------------\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "   Rank                    Title                     Genre  \\\n",
       "0     1  Guardians of the Galaxy   Action,Adventure,Sci-Fi   \n",
       "1     2               Prometheus  Adventure,Mystery,Sci-Fi   \n",
       "2     3                    Split           Horror,Thriller   \n",
       "3     4                     Sing   Animation,Comedy,Family   \n",
       "4     5            Suicide Squad  Action,Adventure,Fantasy   \n",
       "\n",
       "                                         Description              Director  \\\n",
       "0  A group of intergalactic criminals are forced ...            James Gunn   \n",
       "1  Following clues to the origin of mankind, a te...          Ridley Scott   \n",
       "2  Three girls are kidnapped by a man with a diag...    M. Night Shyamalan   \n",
       "3  In a city of humanoid animals, a hustling thea...  Christophe Lourdelet   \n",
       "4  A secret government agency recruits some of th...            David Ayer   \n",
       "\n",
       "                                              Actors  Year  Runtime (Minutes)  \\\n",
       "0  Chris Pratt, Vin Diesel, Bradley Cooper, Zoe S...  2014                121   \n",
       "1  Noomi Rapace, Logan Marshall-Green, Michael Fa...  2012                124   \n",
       "2  James McAvoy, Anya Taylor-Joy, Haley Lu Richar...  2016                117   \n",
       "3  Matthew McConaughey,Reese Witherspoon, Seth Ma...  2016                108   \n",
       "4  Will Smith, Jared Leto, Margot Robbie, Viola D...  2016                123   \n",
       "\n",
       "   Rating   Votes  Revenue (Millions)  Metascore  \n",
       "0     8.1  757074              333.13       76.0  \n",
       "1     7.0  485820              126.46       65.0  \n",
       "2     7.3  157606              138.12       62.0  \n",
       "3     7.2   60545              270.32       59.0  \n",
       "4     6.2  393727              325.02       40.0  "
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Rank</th>\n",
       "      <th>Title</th>\n",
       "      <th>Genre</th>\n",
       "      <th>Description</th>\n",
       "      <th>Director</th>\n",
       "      <th>Actors</th>\n",
       "      <th>Year</th>\n",
       "      <th>Runtime (Minutes)</th>\n",
       "      <th>Rating</th>\n",
       "      <th>Votes</th>\n",
       "      <th>Revenue (Millions)</th>\n",
       "      <th>Metascore</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>Guardians of the Galaxy</td>\n",
       "      <td>Action,Adventure,Sci-Fi</td>\n",
       "      <td>A group of intergalactic criminals are forced ...</td>\n",
       "      <td>James Gunn</td>\n",
       "      <td>Chris Pratt, Vin Diesel, Bradley Cooper, Zoe S...</td>\n",
       "      <td>2014</td>\n",
       "      <td>121</td>\n",
       "      <td>8.1</td>\n",
       "      <td>757074</td>\n",
       "      <td>333.13</td>\n",
       "      <td>76.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>Prometheus</td>\n",
       "      <td>Adventure,Mystery,Sci-Fi</td>\n",
       "      <td>Following clues to the origin of mankind, a te...</td>\n",
       "      <td>Ridley Scott</td>\n",
       "      <td>Noomi Rapace, Logan Marshall-Green, Michael Fa...</td>\n",
       "      <td>2012</td>\n",
       "      <td>124</td>\n",
       "      <td>7.0</td>\n",
       "      <td>485820</td>\n",
       "      <td>126.46</td>\n",
       "      <td>65.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>Split</td>\n",
       "      <td>Horror,Thriller</td>\n",
       "      <td>Three girls are kidnapped by a man with a diag...</td>\n",
       "      <td>M. Night Shyamalan</td>\n",
       "      <td>James McAvoy, Anya Taylor-Joy, Haley Lu Richar...</td>\n",
       "      <td>2016</td>\n",
       "      <td>117</td>\n",
       "      <td>7.3</td>\n",
       "      <td>157606</td>\n",
       "      <td>138.12</td>\n",
       "      <td>62.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>Sing</td>\n",
       "      <td>Animation,Comedy,Family</td>\n",
       "      <td>In a city of humanoid animals, a hustling thea...</td>\n",
       "      <td>Christophe Lourdelet</td>\n",
       "      <td>Matthew McConaughey,Reese Witherspoon, Seth Ma...</td>\n",
       "      <td>2016</td>\n",
       "      <td>108</td>\n",
       "      <td>7.2</td>\n",
       "      <td>60545</td>\n",
       "      <td>270.32</td>\n",
       "      <td>59.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>Suicide Squad</td>\n",
       "      <td>Action,Adventure,Fantasy</td>\n",
       "      <td>A secret government agency recruits some of th...</td>\n",
       "      <td>David Ayer</td>\n",
       "      <td>Will Smith, Jared Leto, Margot Robbie, Viola D...</td>\n",
       "      <td>2016</td>\n",
       "      <td>123</td>\n",
       "      <td>6.2</td>\n",
       "      <td>393727</td>\n",
       "      <td>325.02</td>\n",
       "      <td>40.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 16
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T08:03:39.890813Z",
     "start_time": "2025-02-12T08:03:39.874016Z"
    }
   },
   "cell_type": "code",
   "source": "df.describe()",
   "id": "87abbee9a033c275",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "              Rank         Year  Runtime (Minutes)       Rating         Votes  \\\n",
       "count  1000.000000  1000.000000        1000.000000  1000.000000  1.000000e+03   \n",
       "mean    500.500000  2012.783000         113.172000     6.723200  1.698083e+05   \n",
       "std     288.819436     3.205962          18.810908     0.945429  1.887626e+05   \n",
       "min       1.000000  2006.000000          66.000000     1.900000  6.100000e+01   \n",
       "25%     250.750000  2010.000000         100.000000     6.200000  3.630900e+04   \n",
       "50%     500.500000  2014.000000         111.000000     6.800000  1.107990e+05   \n",
       "75%     750.250000  2016.000000         123.000000     7.400000  2.399098e+05   \n",
       "max    1000.000000  2016.000000         191.000000     9.000000  1.791916e+06   \n",
       "\n",
       "       Revenue (Millions)   Metascore  \n",
       "count          872.000000  936.000000  \n",
       "mean            82.956376   58.985043  \n",
       "std            103.253540   17.194757  \n",
       "min              0.000000   11.000000  \n",
       "25%             13.270000   47.000000  \n",
       "50%             47.985000   59.500000  \n",
       "75%            113.715000   72.000000  \n",
       "max            936.630000  100.000000  "
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Rank</th>\n",
       "      <th>Year</th>\n",
       "      <th>Runtime (Minutes)</th>\n",
       "      <th>Rating</th>\n",
       "      <th>Votes</th>\n",
       "      <th>Revenue (Millions)</th>\n",
       "      <th>Metascore</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>1000.000000</td>\n",
       "      <td>1000.000000</td>\n",
       "      <td>1000.000000</td>\n",
       "      <td>1000.000000</td>\n",
       "      <td>1.000000e+03</td>\n",
       "      <td>872.000000</td>\n",
       "      <td>936.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>500.500000</td>\n",
       "      <td>2012.783000</td>\n",
       "      <td>113.172000</td>\n",
       "      <td>6.723200</td>\n",
       "      <td>1.698083e+05</td>\n",
       "      <td>82.956376</td>\n",
       "      <td>58.985043</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>288.819436</td>\n",
       "      <td>3.205962</td>\n",
       "      <td>18.810908</td>\n",
       "      <td>0.945429</td>\n",
       "      <td>1.887626e+05</td>\n",
       "      <td>103.253540</td>\n",
       "      <td>17.194757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>2006.000000</td>\n",
       "      <td>66.000000</td>\n",
       "      <td>1.900000</td>\n",
       "      <td>6.100000e+01</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>11.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>250.750000</td>\n",
       "      <td>2010.000000</td>\n",
       "      <td>100.000000</td>\n",
       "      <td>6.200000</td>\n",
       "      <td>3.630900e+04</td>\n",
       "      <td>13.270000</td>\n",
       "      <td>47.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>500.500000</td>\n",
       "      <td>2014.000000</td>\n",
       "      <td>111.000000</td>\n",
       "      <td>6.800000</td>\n",
       "      <td>1.107990e+05</td>\n",
       "      <td>47.985000</td>\n",
       "      <td>59.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>750.250000</td>\n",
       "      <td>2016.000000</td>\n",
       "      <td>123.000000</td>\n",
       "      <td>7.400000</td>\n",
       "      <td>2.399098e+05</td>\n",
       "      <td>113.715000</td>\n",
       "      <td>72.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>1000.000000</td>\n",
       "      <td>2016.000000</td>\n",
       "      <td>191.000000</td>\n",
       "      <td>9.000000</td>\n",
       "      <td>1.791916e+06</td>\n",
       "      <td>936.630000</td>\n",
       "      <td>100.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 17
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T08:03:50.148887Z",
     "start_time": "2025-02-12T08:03:50.144894Z"
    }
   },
   "cell_type": "code",
   "source": [
    "\n",
    "# # 获取平均评分\n",
    "# print(df[\"Rating\"].mean())\n",
    "print('-'*50)\n",
    "# 导演的人数\n",
    "print(len(set(df[\"Director\"].tolist())))\n",
    "print(len(df[\"Director\"].unique())) #推荐这种方式"
   ],
   "id": "86b62fa648716758",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "--------------------------------------------------\n",
      "644\n",
      "644\n"
     ]
    }
   ],
   "execution_count": 18
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T08:37:00.344900Z",
     "start_time": "2025-02-12T08:37:00.339324Z"
    }
   },
   "cell_type": "code",
   "source": [
    "pd.date_range(start=\"20190101\",periods=10,freq='ME')\n",
    "pd.date_range(start=\"20190101\",periods=10,freq='MS')\n",
    "pd.date_range(start=\"20230710\",periods=10,freq='W')  #拿每周的周日生成"
   ],
   "id": "1c63b01824384896",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DatetimeIndex(['2023-07-16', '2023-07-23', '2023-07-30', '2023-08-06',\n",
       "               '2023-08-13', '2023-08-20', '2023-08-27', '2023-09-03',\n",
       "               '2023-09-10', '2023-09-17'],\n",
       "              dtype='datetime64[ns]', freq='W-SUN')"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 20
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
